Skip to content

Transform to remove Minibatch from model #7746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 20, 2025

Conversation

zaxtax
Copy link
Contributor

@zaxtax zaxtax commented Apr 1, 2025

Description

This is a model transform to remove Minibatched variables in a model and replace them with the full underlying data.

This is very handy for posterior predictive checks, prediction, and other out-of-sample uses of the fitted model

Closes #7521

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc--7746.org.readthedocs.build/en/7746/

@zaxtax zaxtax marked this pull request as draft April 1, 2025 00:02
@zaxtax zaxtax force-pushed the provide_minibatch_removal_transform branch from fcbabb3 to 5866f02 Compare April 1, 2025 00:46
@zaxtax zaxtax marked this pull request as ready for review April 5, 2025 22:10
Copy link

codecov bot commented Apr 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.83%. Comparing base (2705a5e) to head (8bdd5b7).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7746   +/-   ##
=======================================
  Coverage   92.82%   92.83%           
=======================================
  Files         107      107           
  Lines       18326    18343   +17     
=======================================
+ Hits        17011    17028   +17     
  Misses       1315     1315           
Files with missing lines Coverage Δ
pymc/model/transform/basic.py 97.29% <100.00%> (+2.29%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, if you want may also add a test that coords/dim_lengths are preserved

@zaxtax zaxtax force-pushed the provide_minibatch_removal_transform branch 2 times, most recently from 61cd838 to f34576d Compare April 20, 2025 18:30
@zaxtax zaxtax force-pushed the provide_minibatch_removal_transform branch from f34576d to 8bdd5b7 Compare April 20, 2025 19:01
@zaxtax zaxtax merged commit d34ed95 into pymc-devs:main Apr 20, 2025
25 checks passed
@zaxtax zaxtax deleted the provide_minibatch_removal_transform branch April 20, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement model transform to remove minibatching operations from graph
2 participants